package o2o.postman.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import o2o.dao.PO.order.OrderInfo;
import o2o.postman.model.CityPostman;
import o2o.dao.VO.order.OrderInfoVO;
import o2o.dao.VO.postman.CityPostmanVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author hbw
 * @createTime 2021/5/12 0012
 */
@Mapper
public interface CityPostmanMapper extends BaseMapper<CityPostman> {

    IPage<Map<String,Object>> getPostmanList (@Param("page") Page page, @Param("postman") CityPostmanVO postmanVO);


    IPage<Map<String,Object>> getOrderList (@Param("page") Page page, @Param("order")OrderInfoVO orderInfoVO);


    List<Map<String,Object>> getDispatcherStationCount(@Param("order")OrderInfoVO orderInfoVO);


    List<Map<String,Object>> getDispatcherStationHoneycomb();


    List<Map<String,Object>> getDispatcherStationCountStatus(@Param("postman") CityPostmanVO postmanVO);


    List<Map<String,Object>> getOrderIsPosition(@Param("orderNo") String[] orderNo,
                                                @Param("isWork") Integer isWork,
                                                @Param("postmanType") Integer postmanType);

    OrderInfo getPostmanInfo(@Param("orderNo") String orderNo);

    int updatePostmanIsWork(@Param("postmanId")String[] postmanId,@Param("isWork") Integer isWork);

    int queryOverTimeCount(@Param("postmanUsername") String postmanUsername);

    Map<String, BigDecimal> countOrderPickAndPostByPostman(@Param("username") String username);

    List<CityPostman> getHoneycombByPostman (@Param("orderInfo") OrderInfo orderInfo);
}
